package com.yellowpage.ca.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * RoleFunction entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CA_ROLE_FUNCTION")
public class RoleFunction implements java.io.Serializable {

	// Fields

	private Long roleFunctionId;
	private Long roleId;
	private Long functionId;
	private Long createUser;
	private Date createTime;

	// Constructors

	/** default constructor */
	public RoleFunction() {
	}

	/** full constructor */
	public RoleFunction(Long roleId, Long functionId, Long createUser,
			Date createTime) {
		this.roleId = roleId;
		this.functionId = functionId;
		this.createUser = createUser;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ROLE_FUNCTION_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getRoleFunctionId() {
		return this.roleFunctionId;
	}

	public void setRoleFunctionId(Long roleFunctionId) {
		this.roleFunctionId = roleFunctionId;
	}

	@Column(name = "ROLE_ID", precision = 18, scale = 0)
	public Long getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	@Column(name = "FUNCTION_ID", precision = 18, scale = 0)
	public Long getFunctionId() {
		return this.functionId;
	}

	public void setFunctionId(Long functionId) {
		this.functionId = functionId;
	}

	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}